/** @jsxImportSource @emotion/react */
import * as React from "react";
import {CCell, Cell, Table, TableBody, TableRow, Text,} from "customize-easy-ui-component";
import { DirectLink } from "../../../routing/Link";
import {useThreeColumnView} from "../../hook/useThreeColumnSubr";
import {config设备概况} from "./orcBase";

//整个结论报告页
export const 结论报告概况= ({ orc, rep,theme } : { orc: any, rep: any,theme:any}
) => {
  const [firstNode,]=useThreeColumnView({orc, config:config设备概况,slash:true,});
  return <>
    <Text id={'Conclusion'} variant="h2" css={{textAlign:'center', "@media print": {pageBreakBefore: 'always',},
    }}>氧舱定期检验报告</Text>
    <Text css={{display: 'flex',flexDirection: 'row-reverse',marginRight: '2rem'
    }}>报告编号：{rep.isp?.no}</Text>
    <Table fixed={ ["20%","18%","17%","16.1%","16%","%"] } css={ {borderCollapse: 'collapse' } }  tight  miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Survey#Survey`}>
          {firstNode}
        </DirectLink>
      </TableBody>
    </Table>
    <Table fixed={ ["8.6%", "%"] } css={ {borderCollapse: 'collapse' } }  tight  miniw={800}>
      <TableBody>
        <DirectLink  href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Survey#Survey`}>
          <TableRow >
            <CCell>检验依据</CCell>
            <CCell>
             《氧舱安全技术监察规程》TSG 24-2015、《固定式压力容器安全技术监察规程》TSG 21-2016
            </CCell>
          </TableRow>
        </DirectLink>
        <DirectLink href={`/report/${rep?.modeltype}/ver/${rep?.modelversion}/${rep?.id}/Conclusion#Conclusion`}>
          <TableRow>
            <CCell>问题与处理</CCell>
            <Cell split={true}><div css={{minHeight: '2rem', whiteSpace: 'pre-wrap'}}>
              本次检验所发现缺陷的性质、位置、程度(必要时附图)和处理意见以及有关变化情况：<br/>
              {orc.问题及处 || '／'}
            </div></Cell>
          </TableRow>
        </DirectLink>
      </TableBody>
    </Table>
  </>;
};
